package entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import entity.Equipment.STATE;

@Entity
public class EquipmentBorrow extends Event {
	@ManyToOne
	private Staff staff;

	public EquipmentBorrow(Staff staff, Equipment equipment) {
		super(equipment);
		this.staff = staff;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	@Override
	protected void changeEquipmentState() {
		getEquipment().setState(STATE.EQUIPMENTBORROWED);
	}

}